<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="maximum-scale=1,minimum-scale=1,user-scalable=0,width=device-width,initial-scale=1"><meta name="format-detection" content="telephone=no,email=no,date=no,address=no"><link rel="stylesheet" href="../../../global/css/aui.css"><link rel="stylesheet" href="../../../global/css/my-css.css"><style>.tab-bar {
            padding-left: 10px;
            padding-right: 10px;
            /* color: #02BE97; */
        }

        .tab-active {
            color: #02BE97;
            font-size: 18px;
        }

        .tab-active::after {
            content: "";
            height: 2px;
            width: 100%;
            background: #02BE97;
            display: block;
            border-radius: 5px;
            margin-top: -7px;
        }</style></head><body><header class="aui-bar aui-bar-nav" id="aui-header"><a class="aui-btn aui-pull-left" tapmode onclick="views.closeWin();"><img class="auix-icon-left" src="../../../global/image/icon-left.png"></a><div class="s-16 p-b5 aui-title" id="tab"><div class="flex j-center aui-hide" id="selfTab"><div tapmode onclick="switchTab('focus')" class="tab-bar focus">关注</div><div tapmode onclick="switchTab('fans')" class="tab-bar fans">粉丝</div><div tapmode onclick="switchTab('friend')" class="tab-bar friend">朋友</div></div><div class="flex j-center aui-hide" id="otherTab"><div tapmode onclick="switchTab('other-focus')" class="tab-bar other-focus">TA的关注</div><div tapmode onclick="switchTab('other-fans')" class="tab-bar other-fans">TA的粉丝</div></div></div></header></body><script src="../../../config.js"></script><script src="../../../global/script/lib/api.js"></script><script src="../../../global/script/lib/doT.min.js"></script><script src="../../../global/script/mylib.js"></script><script src="../../../app.js"></script><script type="text/javascript">apiready = function () {
        window.app.init4Win();

        var header = $api.byId('aui-header');
        $api.fixStatusBar(header);
        var headerPos = $api.offset(header);
        var body_h = $api.offset($api.dom('body')).h;

        // 高亮显示 tab
        var name = api.pageParam.name;
        var from = api.pageParam.from;
        if(from == 'mycenter'){
            $api.removeCls($api.byId('selfTab'), 'aui-hide');
        }
        if(from == 'ucenter'){
            $api.removeCls($api.byId('otherTab'), 'aui-hide');
        }
        apix.openFrame({
            name: 'frm-follow',
            url: './frm.html',
            rect: {
                x: 0,
                y: headerPos.h,
                w: 'auto',
                h: 'auto'
            },
            pageParam: api.pageParam ,
        })

        clearActive();
        $api.addCls($api.dom('.' + name), 'tab-active'); // 从哪里点击进来 高亮哪个

    };

    function switchTab(name) {
        frmToTop();
        clearActive();
        $api.addCls($api.dom('.' + name), 'tab-active');
        // 本想使用缓存，但是感觉好像没有必要缓存，就每次请求一下最新呗？
        evt.send('renderFollow',{
            name:name
        })
    }
    // 清空所有样式
    function clearActive() {
        $api.removeCls($api.dom('.focus'), 'tab-active'); // 关注
        $api.removeCls($api.dom('.fans'), 'tab-active'); // 粉丝
        $api.removeCls($api.dom('.friend'), 'tab-active');  // 朋友
        $api.removeCls($api.dom('.other-focus'), 'tab-active');  // TA的关注
        $api.removeCls($api.dom('.other-fans'), 'tab-active');  // TA的粉丝
    }</script></html>